package com.njworkorder;


import cn.microvideo.qsc.client.api.QsApi;
import cn.microvideo.qsc.client.entity.User;
import cn.microvideo.qsc.client.entity.xml.ParentRoles;
import com.njworkorder.HTSingleLogin.QsClient;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;


@SpringBootApplication
@EnableCaching
@EnableAsync
@EnableScheduling
@MapperScan("com.njworkorder.Mapper")
@MapperScan("com.njworkorder.HTSingleLogin")
@ComponentScan(basePackages = {"com.njworkorder", "com.njworkorder.HTSingleLogin"})
public class NjWorkorderApplication {
    public static void main(String[] args) {
        SpringApplication.run(NjWorkorderApplication.class, args);


        QsClient.init();
//        User user = QsApi.getApi().getPersonByPid("18260087272");
//        System.out.println(user);
//
//        ParentRoles roleByUid = QsApi.getApi().findRoleByUid("18260087272");
//        System.out.println(roleByUid.getRoles().getRoleList().getFirst().getName());

    }
}
